package com.forte.cartdao;

import com.forte.exception.InvalidParameterException;
import com.forte.productdao.Product;
import com.forte.shoppingcustomerdao.ShoppingCustomer;

public interface CartDAO {
	
	void saveOrUpdate(Cart cart);
	void saveOrUpdate(ShoppingCustomer customer);
	void saveOrUpdate(CartProduct cartProduct);
	Cart findCartById(int cartId);
    Boolean cartExists(Cart cart);
    void addToCart(Cart cart, Product product, int quantity) throws InvalidParameterException;
    void removeProductFromCart(Cart cart, Product product);
    void changeProductQuantityInCart(Cart cart, Product product, int quantity) throws InvalidParameterException;
    double computeTotalValue(Cart cart);
    CartProduct findCartAndProductInCartProduct(int cartId, int productId);
    Cart findCartByCookeId(String cookieId);
    Cart findCartByIdOrCookieId(int cartId, String cookieId);
    Cart findCartByCartId(int cartId);
}
